package com.technology.education.ui.student.teacher

import androidx.lifecycle.MutableLiveData
import com.technology.education.data.ListModel
import com.technology.education.data.model.TeacherInfoModel
import com.technology.education.network.apiService
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request
import me.hgj.jetpackmvvm.state.ResultState

/**
 *@author:create by BZY
 *Date: 2022/3/21 10
 */
class TeacherListViewModel : BaseViewModel() {
    val result = MutableLiveData<ResultState<ListModel<TeacherInfoModel>>>()
    override fun getData() {
        super.getData()
        request({
            apiService.teacherList(
                hashMapOf(
                    "pageNo" to pageIndex,
                    "pageSize" to pageSize
                )
            )
        }, result)
    }
}